%tr
  %td{:align => "left"}
    %font{body_font}
      - if gateway == :stripe
        = t("emails.payment_receipt_to_seller.stripe.you_have_received_new_payment", :listing_title => listing_title, :payment_sum => payment_total, :payer_full_name => payer_given_name).html_safe
      - else
        = t("emails.payment_receipt_to_seller.you_have_received_new_payment", :listing_title => listing_title, :payment_sum => payment_total, :payer_full_name => payer_given_name).html_safe

%tr
  %td{:align => "left", :style => "padding: 20px 0;"}
    %table{:cellpadding => 5, :cellspacing => 0, :style => "border-collapse: collapse; width: 100%"}
      %tbody
        %tr
          %td{:width => "200"}
            %b= t("emails.payment_receipt_to_seller.product")
          %td
            %b= listing_title
        - if duration.present? || listing_quantity > 1
          %tr
            %td{:width => "250"}
              = price_per_unit_title
            %td
              = listing_price
        - if duration.present?
          %tr
            %td{:width => "250"}
              = t("emails.receipt_to_payer.duration")
            %td
              = duration
        - elsif listing_quantity > 1
          %tr
            %td{:width => "250"}
              = quantity_selector_label || t("emails.new_payment.quantity")
            %td
              = listing_quantity
        - if payment_buyer_service_fee.present?
          %tr{:style => "border-top: 1px solid black"}
            %td
              %b= t("emails.payment_receipt_to_seller.subtotal")
            %td
              %b= subtotal
        - else
          %tr{:style => "border-top: 1px solid black"}
            %td
              %b= t("emails.payment_receipt_to_seller.price_payer_paid", :payer_full_name => payer_given_name)
            %td
              %b= payment_total
        %tr
          %td
            = t("emails.payment_receipt_to_seller.service_fee")
          %td= "#{payment_service_fee}"

        -# if payment_buyer_service_fee.present?
          %tr
            %td
              = t("emails.payment_receipt_to_seller.buyer_service_fee")
            %td= "#{payment_buyer_service_fee}"


        - if shipping_total.present?
          %tr
            %td
              = t("emails.payment_receipt_to_seller.shipping_total")
            %td= shipping_total

        - if payment_gateway_fee.present? && gateway.to_s != 'stripe'
          %tr
            %td
              = t("emails.payment_receipt_to_seller.payment_gateway_fee")
            %td= "#{payment_gateway_fee}"

        %tr{:style => "border-top: 1px solid black"}
          %td
            %b= t("emails.payment_receipt_to_seller.you_will_get")
          %td
            %b= payment_seller_gets

= render :partial => "person_mailer/action_button", :locals => { :text => t("emails.conversation_status_changed.view_thread"), :url => conversation_url}
